package com.mdd.product.validate;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 商品spu参数
 * @author LikeAdmin
 */
@Data
@ApiModel("商品spu更新参数")
public class ProductSpuUpdateValidate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品 SPU 编号，自增")
    private Long id;

    @NotNull(message = "name参数缺失")
    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "关键字")
    private String keyword;

    @ApiModelProperty(value = "商品简介")
    private String introduction;

    @ApiModelProperty(value = "商品详情")
    private String description;

    @ApiModelProperty(value = "条形码")
    private String barCode;

    @NotNull(message = "categoryId参数缺失")
    @ApiModelProperty(value = "商品分类编号")
    private Long categoryId;

    @ApiModelProperty(value = "商品品牌编号")
    private Long brandId;

    @ApiModelProperty(value = "商品封面图")
    private String picUrl;

    @NotNull(message = "sliderPicUrls参数缺失")
    @ApiModelProperty(value = "商品轮播图地址 数组，以逗号分隔 最多上传5张")
    private String sliderPicUrls;

    @NotNull(message = "videoUrl参数缺失")
    @ApiModelProperty(value = "商品视频")
    private String videoUrl;

    @ApiModelProperty(value = "单位")
    private Long unit;

    @ApiModelProperty(value = "排序字段")
    private Integer sort;

    @ApiModelProperty(value = "商品状态: 0 上架（开启） 1 下架（禁用）-1 回收")
    private Integer status;

    @NotNull(message = "specType参数缺失")
    @ApiModelProperty(value = "规格类型：0 单规格 1 多规格")
    private Integer specType;

    @ApiModelProperty(value = "商品价格，单位使用：分")
    private BigDecimal price;

    @ApiModelProperty(value = "市场价，单位使用：分")
    private BigDecimal marketPrice;

    @ApiModelProperty(value = "成本价，单位： 元")
    private BigDecimal costPrice;

    @ApiModelProperty(value = "库存")
    private Long stock;

    @ApiModelProperty(value = "商品销量")
    private Integer salesCount;

    /**
     * 更新sku
     */
    List<ProductSkuUpdateValidate> skus;
    /**
     * 属性列表
     */
    List<ProductPropertyUpdateValidate> propertyList;
    /**
     * 租赁方案
     */
    List<LeasingSchemeUpdateValidate> leasingSchemes;
}
